<%--
  Created by IntelliJ IDEA.
  User: fight
  Date: 2020/4/16
  Time: 13:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include.inc.jsp" %>
<html lang="zh">
<head>
    <meta charset="utf-8"/>
    <title>Simple example - Editor.md examples</title>
    <link rel="stylesheet" href="${ctx}/static/css/style.css"/>
    <link rel="stylesheet" href="${ctx}/static/plugin/editormd/css/editormd.css"/>
    <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon"/>


</head>
<body>
<div class="header">
    this is header..
</div>
<div class="">
    <div id="layout" style="overflow-y:scroll;">
        <div id="test-editormd">
            <textarea style="display:none;"></textarea>
        </div>
    </div>
</div>
<div class="save-to" style="height: 400px; background-color: #ccc;">
    分类信息
</div>

<script src="static/js/jquery.min.js"></script>
<script src="static/plugin/editormd.js"></script>
<script type="text/javascript">
    var testEditor;

    $(function () {
        testEditor = editormd("test-editormd", {
            width: "98%",
            height: 550,
            syncScrolling: "single",
            path: "${ctx}/static/plugin/editormd/lib/",
            imageUpload: true, //开启图片上传
            imageUploadURL: '${ctx}/uploadClientFile', //图片上传后台地址
            onchange: function () {
            },
            onload: function () {
                // 引入插件 执行监听方法
                editormd.loadPlugin("${ctx}/static/plugin/editormd/image-handle-paste/image-handle-paste", function () {
                    testEditor.imagePaste();
                });
            }
        });

        /*
        // or
        testEditor = editormd({
            id      : "test-editormd",
            width   : "90%",
            height  : 640,
            path    : "../lib/"
        });
        */
    });
</script>
</body>
</html>